
@echo off
set _time_end=%time% 
set /a _hour_end=%_time_end:~0,2% 
set /a _minute_end=1%_time_end:~3,2%-100 
set /a _second_end=1%_time_end:~6,2%-100 
echo End task at %time% 
REM echo %_hour_end% 
REM echo %_minute_end% 
REM echo %_second_end% 
REM pause 

if %_second_end% lss %second_start_% ( 
set /a _second_end=%_second_end%+60 
set /a _minute_end=%_minute_end%-1 
) 
set /a second=%_second_end%-%second_start_% 

if %_minute_end% lss %minute_start_% ( 
set /a _minute_end=%_minute_end%+60 
set /a _hour_end=%_hour_end%-1 
) 
set /a minute=%_minute_end%-%minute_start_% 

if %_hour_end% lss %hour_start_% ( 
set /a _hour_end=%_hour_end%+24 
) 
set /a hour=%_hour_end%-%hour_start_% 
echo Use time %hour% hours %minute% minutes %second% seconds
pause 